Telegram Group & Telegram Channel
🖥 py-pglite — PostgreSQL без установки, тестируй как с SQLite!

py-pglite — обёртка PGlite для Python, позволяющая запускать настоящую базу PostgreSQL прямо при тестах. Без Docker, без настройки — просто импортируй и работай.

📌 Почему это круто:
- 🧪 Ноль конфигурации: никакого Postgres и Docker, только Python
- Молниеносный старт: 2–3 с против 30–60 с на традиционные подходы :contentReference[oaicite:2]{index=2}
- 🔐 Изолированные базы: новая база для каждого теста — чисто и безопасно
- 🏗️ Реальный Postgres: работает с JSONB, массивами, оконными функциями
- 🔌 Совместимость: SQLAlchemy, Django, psycopg, asyncpg — любая связка :contentReference[oaicite:3]{index=3}

💡 Примеры установки:

pip install py-pglite
pip install py-pglite[sqlalchemy] # SQLAlchemy/SQLModel
pip install py-pglite[django] # Django + pytest-django
pip install py-pglite[asyncpg] # Асинхронный клиент
pip install py-pglite[all] # Всё сразу


🔧 Пример (SQLAlchemy)


python
def test_sqlalchemy_just_works(pglite_session):
user = User(name="Alice")
pglite_session.add(user)
pglite_session.commit()
assert user.id is not None


py‑pglite — идеальный инструмент для unit- и интеграционных тестов, где нужен настоящий Postgres, но без всей админской рутины.

Полноценный PostgreSQL — без его тяжеловесности.


Github

@pythonl

#python #sql #PostgreSQL #opensource
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/pythonl/4878
Create:
Last Update:

🖥 py-pglite — PostgreSQL без установки, тестируй как с SQLite!

py-pglite — обёртка PGlite для Python, позволяющая запускать настоящую базу PostgreSQL прямо при тестах. Без Docker, без настройки — просто импортируй и работай.

📌 Почему это круто:
- 🧪 Ноль конфигурации: никакого Postgres и Docker, только Python
- Молниеносный старт: 2–3 с против 30–60 с на традиционные подходы :contentReference[oaicite:2]{index=2}
- 🔐 Изолированные базы: новая база для каждого теста — чисто и безопасно
- 🏗️ Реальный Postgres: работает с JSONB, массивами, оконными функциями
- 🔌 Совместимость: SQLAlchemy, Django, psycopg, asyncpg — любая связка :contentReference[oaicite:3]{index=3}

💡 Примеры установки:


pip install py-pglite
pip install py-pglite[sqlalchemy] # SQLAlchemy/SQLModel
pip install py-pglite[django] # Django + pytest-django
pip install py-pglite[asyncpg] # Асинхронный клиент
pip install py-pglite[all] # Всё сразу


🔧 Пример (SQLAlchemy)


python
def test_sqlalchemy_just_works(pglite_session):
user = User(name="Alice")
pglite_session.add(user)
pglite_session.commit()
assert user.id is not None


py‑pglite — идеальный инструмент для unit- и интеграционных тестов, где нужен настоящий Postgres, но без всей админской рутины.

Полноценный PostgreSQL — без его тяжеловесности.


Github

@pythonl

#python #sql #PostgreSQL #opensource

BY Python/ django




Share with your friend now:
tg-me.com/pythonl/4878

View MORE
Open in Telegram


Python django Telegram | DID YOU KNOW?

Date: |

Can I mute a Telegram group?

In recent times, Telegram has gained a lot of popularity because of the controversy over WhatsApp’s new privacy policy. In January 2021, Telegram was the most downloaded app worldwide and crossed 500 million monthly active users. And with so many active users on the app, people might get messages in bulk from a group or a channel that can be a little irritating. So to get rid of the same, you can mute groups, chats, and channels on Telegram just like WhatsApp. You can mute notifications for one hour, eight hours, or two days, or you can disable notifications forever.

For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.

Python django from tw


Telegram Python/ django
FROM USA